#!/usr/bin/perl
use utf8;
use strict;

sub total {
	my @args = @_;
	my $sum = 0;
	foreach (@args) {
		$sum += $_;
	}
	$sum;
	print $sum, "\n";
}
&total (1 .. 1000);